/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.meducated.sandbox.scriptingandqueues;

import javax.jdo.annotations.Embedded;
import javax.jdo.annotations.EmbeddedOnly;
import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 *
 * @author Greg Scott
 */
@PersistenceCapable
public class DemoPatient {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true")
    private String key;
 
    @Persistent
    private String code;

    /**
     * @return the hr
     */
    public int getHr() {
        return hr;
    }

    /**
     * @param hr the hr to set
     */
    public void setHr(int hr) {
        this.hr = hr;
    }

    /**
     * @return the code
     */
    public String getCode() {
        return code;
    }

    /**
     * @param code the code to set
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * @return the bp
     */
    public BP getBp() {
        return bp;
    }

      /**
     * @param bp the bp to set
     */
    public void setBp(BP bp) {
        this.bp = bp;
    }
    /**
     * @return the clock
     */
    public int getClock() {
        return clock;
    }

    /**
     * @param clock the clock to set
     */
    public void setClock(int clock) {
        this.clock = clock;
    }

   
    
    @PersistenceCapable 
    @EmbeddedOnly 
    public static class BP {
        @Persistent
        private int sbp;
        @Persistent
        private int dbp;

        /**
         * @return the sbp
         */
        public int getSbp() {
            return sbp;
        }

        /**
         * @param sbp the sbp to set
         */
        public void setSbp(int sbp) {
            this.sbp = sbp;
        }

        /**
         * @return the dbp
         */
        public int getDbp() {
            return dbp;
        }

        /**
         * @param dbp the dbp to set
         */
        public void setDbp(int dbp) {
            this.dbp = dbp;
        }
    }
    @Persistent
    @Embedded
    private BP bp;
    
    @Persistent
    private int hr; 
    
    @Persistent
    private int clock;
    
     /**
     * @return the key
     */
    public String getKey() {
        return key;
    }

    /**
     * @param key the key to set
     */
    public void setKey(String key) {
        this.key = key;
    }
    
}
